#include <stdio.h>
#include <stdlib.h>

//统计一个字符串中连续最长数字字串的个数并输出
//sdf123asdas12345678fdgf123456789dgfd123
//123456789
int len(char *src)
{   
    int len = 0;
    int max_len = 0;

    while(*src != '\0')
    {   //连续判断使用while
        while((*src >= '0' && *src <= '9') && *src != '\0')
        {
        len++;
        src++;
        }

        if(len > max_len)
        {
            max_len = len;
        }

        len = 0;
        src++;
    }
    return max_len;
}
int main(int argc,char *argv[])
{
    char *src = (char *)malloc(sizeof(char) * 100);

    printf("Please input src:\n");
    scanf("%s",src);

    printf("src = %s\n",src);

    int max_len = len(src);

    printf("the max len = %d\n",max_len);

    return 0;
}